ScanDocument GetEstimatedCycleTime

The "EstimateCycleTime" function is used to calculate the estimated cycle time in seconds for a marking job. This function calculates the cycle time for each ScanImage within the ScanDocument, taking into account the marking properties of each image. It then aggregates these individual cycle times to provide an estimation of the total cycle time for the entire marking job. This estimation can be helpful in planning and optimizing the marking process.

public float GetEstimatedCycleTime()

 

Return value

float Estimated Cycle time in Seconds

 

Example

Copy
 scanDocument = scanDeviceManager.CreateScanDocument(GetselectedDeviceUniqueName(), DistanceUnit.Millimeters, false);

 if (scanDocument != null)
 {
     VectorImage vectorImage = scanDocument.CreateVectorImage("image1", DistanceUnit.Millimeters);

     vectorImage.SetMarkSpeed(1000);
     vectorImage.SetJumpSpeed(2000);
     vectorImage.SetJumpDelay(100);
     vectorImage.SetMarkDelay(100);

     //Set Laser Delays
     vectorImage.SetLaserOnDelay(10);
     vectorImage.SetLaserOffDelay(10);

     CircleShape circleShape = new CircleShape();
     circleShape.CenterPoint.X = 0.0f;
     circleShape.CenterPoint.Y = 0.0f;
     circleShape.CenterPoint.Z = 0.0f;
     circleShape.Clockwise = true;
     circleShape.Radius = 10;
     circleShape.StartAngle = 0;
     circleShape.MaximumSegmentationError = 0.001f;

     vectorImage.AddCircle(circleShape);

     scanDocument.Scripts.Add(new ScanningScriptChunk("defaultScript", "ScanAll()"));
     float cycleTime = scanDocument.GetEstimatedCycleTime();


     try
     {
         scanDocument.StartScanning();
     }
     catch
     {

     }
 }